package org.zero.onlinesubject.utils;

import org.zero.onlinesubject.entity.User;

public class UserContextHolder {
    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void set(User user){
        threadLocal.set(user);
    }

    public static User get(){
        return threadLocal.get();
    }

    public static void remove(){
        threadLocal.remove();
    }
}
